﻿using System;
using System.Collections.Generic;
using Assets.Scripts.AI.Actions.Interaction;
using Assets.Scripts.GtsScripts;
using Assets.Scripts.ProceduralCityGenerator;
using MoonSharp.Interpreter;
using SteeringBehaviors;
using UnityEngine;

namespace Lua
{
	// Token: 0x020002EC RID: 748
	[MoonSharpUserData]
	public class Entity
	{
		// Token: 0x06001194 RID: 4500 RVA: 0x0007FAF2 File Offset: 0x0007DCF2
		[MoonSharpHidden]
		internal Entity(EntityBase entity)
		{
			if (entity == null)
			{
				Debug.LogError("Error, empty entity.");
			}
			this.entity = entity;
		}

		// Token: 0x1700028C RID: 652
		// (get) Token: 0x06001195 RID: 4501 RVA: 0x0007FB17 File Offset: 0x0007DD17
		public Table dict
		{
			get
			{
				if (this._dict == null)
				{
					this._dict = new Table(null);
				}
				return this._dict;
			}
		}

		// Token: 0x1700028D RID: 653
		// (get) Token: 0x06001196 RID: 4502 RVA: 0x0007FB36 File Offset: 0x0007DD36
		public Transform transform
		{
			get
			{
				if (this._transform == null)
				{
					this._transform = new Transform(this.entity.myTransform);
				}
				return this._transform;
			}
		}

		// Token: 0x1700028E RID: 654
		// (get) Token: 0x06001197 RID: 4503 RVA: 0x0007FB5F File Offset: 0x0007DD5F
		public Rigidbody rigidbody
		{
			get
			{
				if (this._rigidbody == null && this.entity.rbody != null)
				{
					this._rigidbody = new Rigidbody(this.entity.rbody);
				}
				return this._rigidbody;
			}
		}

		// Token: 0x1700028F RID: 655
		// (get) Token: 0x06001198 RID: 4504 RVA: 0x0007FB9E File Offset: 0x0007DD9E
		public AI ai
		{
			get
			{
				if (this._ai == null && this.entity.ai != null)
				{
					this._ai = new AI(this.entity);
				}
				return this._ai;
			}
		}

		// Token: 0x17000290 RID: 656
		// (get) Token: 0x06001199 RID: 4505 RVA: 0x0007FBD8 File Offset: 0x0007DDD8
		public Animation animation
		{
			get
			{
				if (this._animation == null && this.entity.animationManager != null)
				{
					this._animation = new Animation(this.entity);
				}
				return this._animation;
			}
		}

		// Token: 0x17000291 RID: 657
		// (get) Token: 0x0600119A RID: 4506 RVA: 0x0007FC14 File Offset: 0x0007DE14
		public Bones bones
		{
			get
			{
				if (this._bones == null)
				{
					this._animator = this.entity.GetComponent<Animator>();
					if (this._animator != null)
					{
						this._bones = new Bones(this._animator);
					}
				}
				return this._bones;
			}
		}

		// Token: 0x17000292 RID: 658
		// (get) Token: 0x0600119B RID: 4507 RVA: 0x0007FC68 File Offset: 0x0007DE68
		public IK ik
		{
			get
			{
				if (!this.entity.isGiantess || this.entity.ik == null)
				{
					return null;
				}
				if (this._ik == null)
				{
					this._ik = new IK(this.entity.ik);
				}
				return this._ik;
			}
		}

		// Token: 0x17000293 RID: 659
		// (get) Token: 0x0600119C RID: 4508 RVA: 0x0007FCC4 File Offset: 0x0007DEC4
		public Senses senses
		{
			get
			{
				if (this._senses == null && this.entity.senses != null)
				{
					this._senses = new Senses(this.entity);
				}
				return this._senses;
			}
		}

		// Token: 0x17000294 RID: 660
		// (get) Token: 0x0600119D RID: 4509 RVA: 0x0007FCF8 File Offset: 0x0007DEF8
		public Morphs morphs
		{
			get
			{
				if (!this.entity.isGiantess)
				{
					return null;
				}
				if (this._morphs == null)
				{
					this._morphs = new Morphs(this.entity);
				}
				return this._morphs;
			}
		}

		// Token: 0x17000295 RID: 661
		// (get) Token: 0x0600119E RID: 4510 RVA: 0x0007FD2E File Offset: 0x0007DF2E
		public Movement movement
		{
			get
			{
				if (this._movement == null && this.entity.movement != null)
				{
					this._movement = new Movement(this.entity);
				}
				return this._movement;
			}
		}

		// Token: 0x17000296 RID: 662
		// (get) Token: 0x0600119F RID: 4511 RVA: 0x0007FD68 File Offset: 0x0007DF68
		public Shooting shooting
		{
			get
			{
				if (this._shooting == null && this.entity.GetComponent<AIShooterController>() != null)
				{
					this._shooting = new Shooting(this.entity);
				}
				return this._shooting;
			}
		}

		// Token: 0x17000297 RID: 663
		// (get) Token: 0x060011A0 RID: 4512 RVA: 0x0007FDA2 File Offset: 0x0007DFA2
		// (set) Token: 0x060011A1 RID: 4513 RVA: 0x0007FDAF File Offset: 0x0007DFAF
		public Vector3 position
		{
			get
			{
				return this.transform.position;
			}
			set
			{
				this.transform.position = value;
			}
		}

		// Token: 0x17000298 RID: 664
		// (get) Token: 0x060011A2 RID: 4514 RVA: 0x0007FDC0 File Offset: 0x0007DFC0
		// (set) Token: 0x060011A3 RID: 4515 RVA: 0x0007FDF4 File Offset: 0x0007DFF4
		public bool CanLookAtPlayer
		{
			get
			{
				if (!this.entity.isGiantess)
				{
					return false;
				}
				Giantess component = this.entity.GetComponent<Giantess>();
				return component.canLookAtPlayer;
			}
			set
			{
				if (!this.entity.isGiantess)
				{
					return;
				}
				Giantess component = this.entity.GetComponent<Giantess>();
				component.canLookAtPlayer = value;
			}
		}

		// Token: 0x17000299 RID: 665
		// (get) Token: 0x060011A4 RID: 4516 RVA: 0x0007FE25 File Offset: 0x0007E025
		public int id
		{
			get
			{
				return this.entity.id;
			}
		}

		// Token: 0x1700029A RID: 666
		// (get) Token: 0x060011A5 RID: 4517 RVA: 0x0007FE32 File Offset: 0x0007E032
		// (set) Token: 0x060011A6 RID: 4518 RVA: 0x0007FE3F File Offset: 0x0007E03F
		public string name
		{
			get
			{
				return this.entity.name;
			}
			set
			{
				this.entity.name = value;
			}
		}

		// Token: 0x1700029B RID: 667
		// (get) Token: 0x060011A7 RID: 4519 RVA: 0x0007FE4D File Offset: 0x0007E04D
		public string modelName
		{
			get
			{
				return this.entity.model;
			}
		}

		// Token: 0x1700029C RID: 668
		// (get) Token: 0x060011A8 RID: 4520 RVA: 0x0007FE5A File Offset: 0x0007E05A
		// (set) Token: 0x060011A9 RID: 4521 RVA: 0x0007FE67 File Offset: 0x0007E067
		public virtual float scale
		{
			get
			{
				return this.entity.AccurateScale;
			}
			set
			{
				this.entity.AccurateScale = value;
			}
		}

		// Token: 0x1700029D RID: 669
		// (get) Token: 0x060011AA RID: 4522 RVA: 0x0007FE75 File Offset: 0x0007E075
		public virtual float baseHeight
		{
			get
			{
				return this.entity.baseHeight;
			}
		}

		// Token: 0x1700029E RID: 670
		// (get) Token: 0x060011AB RID: 4523 RVA: 0x0007FE82 File Offset: 0x0007E082
		// (set) Token: 0x060011AC RID: 4524 RVA: 0x0007FE8F File Offset: 0x0007E08F
		public virtual float height
		{
			get
			{
				return this.entity.Height;
			}
			set
			{
				this.entity.ChangeScale(value / this.entity.baseHeight);
			}
		}

		// Token: 0x1700029F RID: 671
		// (get) Token: 0x060011AD RID: 4525 RVA: 0x0007FEA9 File Offset: 0x0007E0A9
		// (set) Token: 0x060011AE RID: 4526 RVA: 0x0007FEB6 File Offset: 0x0007E0B6
		public virtual float maxSize
		{
			get
			{
				return this.entity.maxSize;
			}
			set
			{
				this.entity.maxSize = value;
			}
		}

		// Token: 0x170002A0 RID: 672
		// (get) Token: 0x060011AF RID: 4527 RVA: 0x0007FEC4 File Offset: 0x0007E0C4
		// (set) Token: 0x060011B0 RID: 4528 RVA: 0x0007FED1 File Offset: 0x0007E0D1
		public virtual float minSize
		{
			get
			{
				return this.entity.minSize;
			}
			set
			{
				this.entity.minSize = value;
			}
		}

		// Token: 0x060011B1 RID: 4529 RVA: 0x0007FEDF File Offset: 0x0007E0DF
		public void Delete()
		{
			this.entity.DestroyObject(true);
		}

		// Token: 0x060011B2 RID: 4530 RVA: 0x0007FEED File Offset: 0x0007E0ED
		public float DistanceTo(Entity target)
		{
			return this.DistanceTo(target.position);
		}

		// Token: 0x060011B3 RID: 4531 RVA: 0x0007FEFC File Offset: 0x0007E0FC
		public float DistanceTo(Vector3 point)
		{
			Vector3 position = this.transform.position;
			float num = position.x - point.x;
			float num2 = position.z - point.z;
			return Mathf.Sqrt(num * num + num2 * num2);
		}

		// Token: 0x060011B4 RID: 4532 RVA: 0x0007FF3D File Offset: 0x0007E13D
		public Entity FindClosestMicro()
		{
			return MicroManager.FindClosestMicro(this.entity, this.entity.Height);
		}

		// Token: 0x060011B5 RID: 4533 RVA: 0x0007FF5A File Offset: 0x0007E15A
		public Entity FindClosestGiantess()
		{
			return GiantessManager.FindClosestGiantess(this.entity, this.entity.Height);
		}

		// Token: 0x060011B6 RID: 4534 RVA: 0x0007FF77 File Offset: 0x0007E177
		public bool isHumanoid()
		{
			return this.entity.isHumanoid;
		}

		// Token: 0x060011B7 RID: 4535 RVA: 0x0007FF84 File Offset: 0x0007E184
		public bool isGiantess()
		{
			return this.entity.isGiantess;
		}

		// Token: 0x060011B8 RID: 4536 RVA: 0x0007FF91 File Offset: 0x0007E191
		public bool isPlayer()
		{
			return this.entity.isPlayer;
		}

		// Token: 0x060011B9 RID: 4537 RVA: 0x0007FF9E File Offset: 0x0007E19E
		public bool isMicro()
		{
			return this.entity.isMicro;
		}

		// Token: 0x060011BA RID: 4538 RVA: 0x0007FFAB File Offset: 0x0007E1AB
		public bool ActionsCompleted()
		{
			return this.ai == null || !this.ai.IsActionActive();
		}

		// Token: 0x060011BB RID: 4539 RVA: 0x0007FFC8 File Offset: 0x0007E1C8
		public virtual void Sit(Vector3 place)
		{
			Debug.LogError("Only giantess can sit.");
		}

		// Token: 0x060011BC RID: 4540 RVA: 0x0007FFD4 File Offset: 0x0007E1D4
		public virtual void Pursue(Entity target)
		{
			Debug.LogError("Objects can't pursue.");
		}

		// Token: 0x060011BD RID: 4541 RVA: 0x0007FFE0 File Offset: 0x0007E1E0
		public virtual void BE(float speed)
		{
			this.AddAction(new BEAction(speed, 0f));
		}

		// Token: 0x060011BE RID: 4542 RVA: 0x0007FFF4 File Offset: 0x0007E1F4
		public virtual void BE(float speed, float time)
		{
			this.AddAction(new BEAction(speed, time));
		}

		// Token: 0x060011BF RID: 4543 RVA: 0x00080004 File Offset: 0x0007E204
		public void SetAnimation(string animationName)
		{
			if (this.animation != null)
			{
				this.animation.Set(animationName);
			}
		}

		// Token: 0x060011C0 RID: 4544 RVA: 0x0008001D File Offset: 0x0007E21D
		public void CompleteAnimation(string animationName)
		{
			if (this.animation != null)
			{
				this.animation.SetAndWait(animationName);
			}
		}

		// Token: 0x060011C1 RID: 4545 RVA: 0x00080036 File Offset: 0x0007E236
		public void SetPose(string pose)
		{
			if (this.animation != null)
			{
				this.animation.SetPose(pose);
			}
		}

		// Token: 0x060011C2 RID: 4546 RVA: 0x0008004F File Offset: 0x0007E24F
		public void CancelAction()
		{
			if (this.ai != null)
			{
				this.ai.StopAction();
			}
		}

		// Token: 0x060011C3 RID: 4547 RVA: 0x00080067 File Offset: 0x0007E267
		public void Grow(float factor)
		{
			this.AddAction(new SizeChangeAction(factor));
		}

		// Token: 0x060011C4 RID: 4548 RVA: 0x00080076 File Offset: 0x0007E276
		public void Grow(float factor, float time)
		{
			this.AddAction(new SizeChangeAction(factor, time));
		}

		// Token: 0x060011C5 RID: 4549 RVA: 0x00080088 File Offset: 0x0007E288
		public void GrowAndWait(float factor, float time)
		{
			SizeChangeAction sizeChangeAction = new SizeChangeAction(factor, time);
			sizeChangeAction.priority = (sizeChangeAction.async = false);
			this.AddAction(sizeChangeAction);
		}

		// Token: 0x060011C6 RID: 4550 RVA: 0x000800B8 File Offset: 0x0007E2B8
		public void MoveTo(Vector3 destination)
		{
			Vector3 vector = destination.vector3.ToWorld();
			if (!this.AddAction(new ArriveAction(new VectorKinematic(vector))))
			{
				this.entity.Move(vector);
			}
		}

		// Token: 0x060011C7 RID: 4551 RVA: 0x000800F3 File Offset: 0x0007E2F3
		public void MoveTo(Entity targetEntity)
		{
			if (!this.AddAction(new ArriveAction(new TransformKinematic(targetEntity.entity.myTransform))))
			{
				this.entity.Move(targetEntity.entity.myTransform.position);
			}
		}

		// Token: 0x060011C8 RID: 4552 RVA: 0x00080130 File Offset: 0x0007E330
		public void Chase(Entity target)
		{
			this.AddAction(new ChaseAction(new TransformKinematic(target.entity.myTransform), new TransformKinematic(this.entity.myTransform), target.entity));
		}

		// Token: 0x060011C9 RID: 4553 RVA: 0x00080164 File Offset: 0x0007E364
		public void Face(Entity target)
		{
			this.AddAction(new FaceAction(new TransformKinematic(target.entity.myTransform)));
		}

		// Token: 0x060011CA RID: 4554 RVA: 0x00080182 File Offset: 0x0007E382
		public void Seek(Entity target, float duration = 0f, float separation = -1f)
		{
			this.AddAction(new SeekAction(new TransformKinematic(target.entity.myTransform), separation, duration));
		}

		// Token: 0x060011CB RID: 4555 RVA: 0x000801A2 File Offset: 0x0007E3A2
		public void Seek(Vector3 position, float duration = 0f, float separation = -1f)
		{
			this.AddAction(new SeekAction(new VectorKinematic(position.vector3.ToWorld()), separation, duration));
		}

		// Token: 0x060011CC RID: 4556 RVA: 0x000801C2 File Offset: 0x0007E3C2
		public void Wander()
		{
			this.AddAction(new WanderAction(0f));
		}

		// Token: 0x060011CD RID: 4557 RVA: 0x000801D5 File Offset: 0x0007E3D5
		public void Wander(float time)
		{
			this.AddAction(new WanderAction(time));
		}

		// Token: 0x060011CE RID: 4558 RVA: 0x000801E4 File Offset: 0x0007E3E4
		public void Wait(float time)
		{
			this.AddAction(new WaitAction(time));
		}

		// Token: 0x060011CF RID: 4559 RVA: 0x000801F3 File Offset: 0x0007E3F3
		public void Flee(Entity target, float time)
		{
			this.AddAction(new FleeAction(new TransformKinematic(target.entity.myTransform), time));
		}

		// Token: 0x060011D0 RID: 4560 RVA: 0x00080212 File Offset: 0x0007E412
		public void Flee(Vector3 position, float time)
		{
			this.AddAction(new FleeAction(new VectorKinematic(position.vector3.ToWorld()), time));
		}

		// Token: 0x060011D1 RID: 4561 RVA: 0x00080234 File Offset: 0x0007E434
		public Vector3 FindRandomBuilding(Entity self)
		{
			CityBuilding cityBuilding = CityHelper.FindRandomStructure(self);
			if (cityBuilding != null)
			{
				return new Vector3(cityBuilding.transform.position.ToVirtual());
			}
			return null;
		}

		// Token: 0x060011D2 RID: 4562 RVA: 0x0008026B File Offset: 0x0007E46B
		public void Wreck()
		{
			this.AddAction(new WreckAction(this.animation));
		}

		// Token: 0x060011D3 RID: 4563 RVA: 0x00080280 File Offset: 0x0007E480
		public void StandUp()
		{
			Micro micro = this.entity as Micro;
			if (micro)
			{
				micro.StandUp();
			}
		}

		// Token: 0x060011D4 RID: 4564 RVA: 0x000802AA File Offset: 0x0007E4AA
		public void Stomp(Entity target)
		{
			if (this.entity.ik == null)
			{
				return;
			}
			this.AddAction(new StompAction(target.entity));
		}

		// Token: 0x060011D5 RID: 4565 RVA: 0x000802D5 File Offset: 0x0007E4D5
		public void Stomp(Vector3 target)
		{
			if (this.entity.ik == null)
			{
				return;
			}
			this.AddAction(new StompAction(target.vector3));
		}

		// Token: 0x060011D6 RID: 4566 RVA: 0x00080300 File Offset: 0x0007E500
		public void Grab(Entity target)
		{
			this.AddAction(new GrabAction(target.entity));
		}

		// Token: 0x060011D7 RID: 4567 RVA: 0x00080314 File Offset: 0x0007E514
		public void LookAt(Entity target)
		{
			if (this.entity.isGiantess && this.entity.ik == null)
			{
				return;
			}
			if (target == null)
			{
				this.AddAction(new LookAction(null));
			}
			else
			{
				this.AddAction(new LookAction(target.entity));
			}
		}

		// Token: 0x060011D8 RID: 4568 RVA: 0x00080374 File Offset: 0x0007E574
		private AIShooterController getShooterController(bool createIfNecessary = false)
		{
			MicroNPC component = this.entity.GetComponent<MicroNPC>();
			if (component == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("Only micros can perform shooting-related actions.");
				}
				return null;
			}
			return component.GetShooterController(createIfNecessary);
		}

		// Token: 0x060011D9 RID: 4569 RVA: 0x000803BC File Offset: 0x0007E5BC
		public void EquipRaygun()
		{
			MicroNPC component = this.entity.GetComponent<MicroNPC>();
			if (component == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("Only micros can perform shooting-related actions.");
				}
				return;
			}
			component.EquipRaygun();
		}

		// Token: 0x060011DA RID: 4570 RVA: 0x00080404 File Offset: 0x0007E604
		public void EquipSMG()
		{
			MicroNPC component = this.entity.GetComponent<MicroNPC>();
			if (component == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("Only micros can perform shooting-related actions.");
				}
				return;
			}
			component.EquipSMG();
		}

		// Token: 0x060011DB RID: 4571 RVA: 0x0008044C File Offset: 0x0007E64C
		public void UnequipGun()
		{
			MicroNPC component = this.entity.GetComponent<MicroNPC>();
			if (component == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("Only micros can perform shooting-related actions.");
				}
				return;
			}
			component.UnequipGun();
		}

		// Token: 0x060011DC RID: 4572 RVA: 0x00080494 File Offset: 0x0007E694
		public void Aim(Entity target)
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new AimAction((target == null) ? null : target.entity));
		}

		// Token: 0x060011DD RID: 4573 RVA: 0x000804F0 File Offset: 0x0007E6F0
		public void StopAiming()
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new AimAction(null));
		}

		// Token: 0x060011DE RID: 4574 RVA: 0x00080538 File Offset: 0x0007E738
		public void StartFiring()
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new ShootAction());
		}

		// Token: 0x060011DF RID: 4575 RVA: 0x00080580 File Offset: 0x0007E780
		public void StopFiring()
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new StopShootAction());
		}

		// Token: 0x060011E0 RID: 4576 RVA: 0x000805C8 File Offset: 0x0007E7C8
		public void Engage(Entity target = null)
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new EngageShootAction((target == null) ? null : target.entity));
		}

		// Token: 0x060011E1 RID: 4577 RVA: 0x00080624 File Offset: 0x0007E824
		public void StopEngaging()
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new StopEngageShootAction());
		}

		// Token: 0x060011E2 RID: 4578 RVA: 0x0008066C File Offset: 0x0007E86C
		public void FireOnce()
		{
			AIShooterController shooterController = this.getShooterController(false);
			if (shooterController == null)
			{
				if (GlobalPreferences.ScriptAuxLogging.value)
				{
					Debug.Log("No shooter controller on entity. Please equip a gun first.");
				}
				return;
			}
			this.AddAction(new OneOffShootAction());
		}

		// Token: 0x060011E3 RID: 4579 RVA: 0x000806B3 File Offset: 0x0007E8B3
		public bool IsDead()
		{
			return this.entity == null || !this.entity.gameObject.activeSelf || this.entity.isDead;
		}

		// Token: 0x060011E4 RID: 4580 RVA: 0x000806EC File Offset: 0x0007E8EC
		public bool IsStuck()
		{
			Micro micro = this.entity as Micro;
			return micro && micro.IsStuck();
		}

		// Token: 0x060011E5 RID: 4581 RVA: 0x0008071C File Offset: 0x0007E91C
		public bool IsTargettable()
		{
			return this.entity && this.entity.IsTargettable();
		}

		// Token: 0x060011E6 RID: 4582 RVA: 0x00080740 File Offset: 0x0007E940
		public bool IsCrushed()
		{
			Micro micro = this.entity as Micro;
			return micro && micro.isCrushed;
		}

		// Token: 0x060011E7 RID: 4583 RVA: 0x00080770 File Offset: 0x0007E970
		protected bool AddAction(AgentAction action)
		{
			if (!this.entity.actionManager)
			{
				return false;
			}
			this.entity.actionManager.ScheduleAction(action);
			return true;
		}

		// Token: 0x060011E8 RID: 4584 RVA: 0x0008079C File Offset: 0x0007E99C
		public void UpdateMeshCollider()
		{
			if (this.entity.isGiantess)
			{
				Giantess component = this.entity.GetComponent<Giantess>();
				component.ForceColliderUpdate();
			}
		}

		// Token: 0x060011E9 RID: 4585 RVA: 0x000807CC File Offset: 0x0007E9CC
		public void ShowBreastPhysicsOptions()
		{
			if (this.entity.isGiantess)
			{
				Giantess component = this.entity.GetComponent<Giantess>();
				component.ManualBreastPhysics();
			}
			else
			{
				Debug.Log("Breast physics menu is only supported on giantess");
			}
		}

		// Token: 0x060011EA RID: 4586 RVA: 0x0008080A File Offset: 0x0007EA0A
		public void PlayAs()
		{
			ObjectManager.Instance.PlayAsEntity(this.entity);
		}

		// Token: 0x060011EB RID: 4587 RVA: 0x0008081C File Offset: 0x0007EA1C
		public static Entity GetSelectedEntity()
		{
			return InterfaceControl.Instance.selectedEntity;
		}

		// Token: 0x060011EC RID: 4588 RVA: 0x0008082D File Offset: 0x0007EA2D
		public static IList<string> GetPlayerModelList()
		{
			return IOManager.Instance.GetPlayerModelList();
		}

		// Token: 0x060011ED RID: 4589 RVA: 0x00080839 File Offset: 0x0007EA39
		public static IList<string> GetGtsModelList()
		{
			return IOManager.Instance.GetGtsModelList();
		}

		// Token: 0x060011EE RID: 4590 RVA: 0x00080845 File Offset: 0x0007EA45
		public static IList<string> GetFemaleMicroList()
		{
			return IOManager.Instance.GetFemaleMicroList();
		}

		// Token: 0x060011EF RID: 4591 RVA: 0x00080851 File Offset: 0x0007EA51
		public static IList<string> GetMaleMicroList()
		{
			return IOManager.Instance.GetMaleMicroList();
		}

		// Token: 0x060011F0 RID: 4592 RVA: 0x0008085D File Offset: 0x0007EA5D
		public static IList<string> GetObjectList()
		{
			return IOManager.Instance.GetObjectList();
		}

		// Token: 0x060011F1 RID: 4593 RVA: 0x00080869 File Offset: 0x0007EA69
		public Entity GetRandomMicro()
		{
			return MicroManager.GetRandomMicro(this.entity);
		}

		// Token: 0x060011F2 RID: 4594 RVA: 0x0008087B File Offset: 0x0007EA7B
		public Entity GetRandomGiantess()
		{
			return GiantessManager.GetRandomGiantess(this.entity);
		}

		// Token: 0x060011F3 RID: 4595 RVA: 0x00080890 File Offset: 0x0007EA90
		public static Entity SpawnGiantess(string name, Vector3 position, Quaternion rotation, float scale)
		{
			GameObject gameObject = ClientPlayer.Instance.SpawnGiantess(name, position.vector3, rotation.quaternion, scale / 1000f, -1);
			if (gameObject == null)
			{
				return null;
			}
			return gameObject.GetComponent<EntityBase>().GetLuaEntity();
		}

		// Token: 0x060011F4 RID: 4596 RVA: 0x000808D8 File Offset: 0x0007EAD8
		public static Entity SpawnFemaleMicro(string name, Vector3 position, Quaternion rotation, float scale)
		{
			GameObject gameObject = ClientPlayer.Instance.SpawnMicro(true, name, position.vector3, rotation.quaternion, scale);
			if (gameObject == null)
			{
				return null;
			}
			return gameObject.GetComponent<EntityBase>().GetLuaEntity();
		}

		// Token: 0x060011F5 RID: 4597 RVA: 0x00080918 File Offset: 0x0007EB18
		public static Entity SpawnMaleMicro(string name, Vector3 position, Quaternion rotation, float scale)
		{
			GameObject gameObject = ClientPlayer.Instance.SpawnMicro(false, name, position.vector3, rotation.quaternion, scale);
			if (gameObject == null)
			{
				return null;
			}
			return gameObject.GetComponent<EntityBase>().GetLuaEntity();
		}

		// Token: 0x060011F6 RID: 4598 RVA: 0x00080958 File Offset: 0x0007EB58
		public static Entity SpawnObject(string name, Vector3 position, Quaternion rotation, float scale)
		{
			GameObject gameObject = ClientPlayer.Instance.SpawnObject(name, position.vector3, rotation.quaternion, scale, -1);
			if (gameObject == null)
			{
				return null;
			}
			return gameObject.GetComponent<EntityBase>().GetLuaEntity();
		}

		// Token: 0x060011F7 RID: 4599 RVA: 0x00080998 File Offset: 0x0007EB98
		public static implicit operator Entity(EntityBase entity)
		{
			return (!(entity == null)) ? new Entity(entity) : null;
		}

		// Token: 0x060011F8 RID: 4600 RVA: 0x000809B4 File Offset: 0x0007EBB4
		[MoonSharpUserDataMetamethod("__eq")]
		public static bool Equals(Entity a, Entity b)
		{
			if (a == null && b == null)
			{
				return true;
			}
			if (a == null)
			{
				return b.entity == null;
			}
			if (b == null)
			{
				return a.entity == null;
			}
			return a.entity == b.entity;
		}

		// Token: 0x040016B7 RID: 5815
		[MoonSharpHidden]
		public EntityBase entity;

		// Token: 0x040016B8 RID: 5816
		private Table _dict;

		// Token: 0x040016B9 RID: 5817
		private Transform _transform;

		// Token: 0x040016BA RID: 5818
		private Rigidbody _rigidbody;

		// Token: 0x040016BB RID: 5819
		private AI _ai;

		// Token: 0x040016BC RID: 5820
		private Animation _animation;

		// Token: 0x040016BD RID: 5821
		private Bones _bones;

		// Token: 0x040016BE RID: 5822
		private Animator _animator;

		// Token: 0x040016BF RID: 5823
		private IK _ik;

		// Token: 0x040016C0 RID: 5824
		private Senses _senses;

		// Token: 0x040016C1 RID: 5825
		private Morphs _morphs;

		// Token: 0x040016C2 RID: 5826
		private Movement _movement;

		// Token: 0x040016C3 RID: 5827
		private Shooting _shooting;
	}
}
